filterIsInstance()
filters based on type. If the type of the emitted item
matches the type used in the filterIsInstance()
call, then the item is passed
along. Otherwise, the item is dropped.
Here, we have a Flow
emitting a mix of integers and strings, and we collect
only the strings.
You can learn more about this in:
Tags: